//
//  UIButton+Extension.swift
//  XYWeibo
//
//  Created by 常晓璇 on 7/2/15.
//  Copyright © 2015 chang xiaoxuan. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(title: String, imageName: String, fontSize: CGFloat) {
        self.init()
        
        setTitle(title, forState: UIControlState.Normal)
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
        setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
    }
}
